use super::{MapSv, VBase, VMap, Value};

pub fn replace_value(change: &MapSv, d: &MapSv) -> Option<Value> {
    let v = d.k_first("v")?.kstr()?;

    if v.starts_with("{") && v.ends_with("}") {
        let v = v.strip_prefix("{")?;
        let v = v.strip_suffix("}")?;

        let val = change.get(v)?;

        return Some(val.clone());
    }

    None
}
